<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
      <el-form :size="size" ref="form" :model="form"  :label-width="$store.getters.device !== 'mobile'?'16%':'90px'">
        <el-row >
          <el-col :span="6">
            <el-form-item :label="$t('field.WorkSetting_fnumber')" prop="fnumber">
              {{form.fnumber}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('field.WorkSetting_fbillno')" prop="fbillno">
              {{form.fbillno}}
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item :label="$t('field.WorkSetting_fname')" prop="fname">
              {{form.fname}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row >
          <el-col :span="7">
            <el-form-item :label="$t('field.WorkSetting_fcustomer')" prop="fcustomer">
              {{form.fcustomer}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('field.WorkSetting_fheader')" prop="fheader">
              {{form.fheader}}
            </el-form-item>
          </el-col>
          <el-col :span="10">
            <el-form-item :label="$t('field.WorkSetting_ftype')" prop="ftype">
              {{form.ftype}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('field.WorkSetting_fnote')" prop="fnote">
              {{form.fnote}}
            </el-form-item>
          </el-col>
        </el-row>

      </el-form>
      <el-table :data ="vsList" style="width: 100%">
        <el-table-column label="No." width="60" align="right" type="index"></el-table-column>
        <el-table-column prop="fnumber" align="center" label="编号" width="120"></el-table-column>
<!--        <el-table-column prop="vsName" align="center" label="名称" width="120"></el-table-column>-->
        <el-table-column prop="fvcom" align="center" label="VCom值" width="120"></el-table-column>
        <el-table-column prop="femperature" align="center" label="温度" width="120"></el-table-column>
        <el-table-column prop="fdianya" align="center" label="电压范围" width="120"></el-table-column>
        <el-table-column prop="fboxing" align="center" label="波形" width="120"></el-table-column>
        <el-table-column prop="frefreshtime" align="center" label="刷新时间" width="120"></el-table-column>
        <el-table-column prop="ftuopanqty" align="center"label="托盘数量" width="120"></el-table-column>

      </el-table>
      <el-table :data ="testList" style="width: 100%">
        <el-table-column label="No." width="60" align="right" type="index"></el-table-column>
        <el-table-column prop="fnumber" align="center" label="编号" width="120"></el-table-column>
<!--        <el-table-column prop="vsName" align="center" label="名称" width="120"></el-table-column>-->
        <el-table-column prop="fvcom" align="center" label="VCom值" width="120"></el-table-column>
        <el-table-column prop="femperature" align="center" label="温度" width="120"></el-table-column>
        <el-table-column prop="fdianya" align="center" label="电压范围" width="120"></el-table-column>
        <el-table-column prop="fboxing" align="center" label="波形" width="120"></el-table-column>
        <el-table-column prop="frefreshtime" align="center" label="刷新时间" width="120"></el-table-column>
        <el-table-column prop="ftuopanqty" align="center"label="托盘数量" width="120"></el-table-column>
      </el-table>
		</el-dialog>
	</div>
</template>
<script>
import { detail  } from '@/api/app/worksetting'
export default {
	name:'workSettingdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{},
      testList:[],
      vsList:[]
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
        console.log(res)
				this.form = res.data.header
        this.testList = res.data.testList
        this.vsList = res.data.vsList
        console.log(this.testList)
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
